package com.cuit.controller;

import com.cuit.params.UserLogin;
import com.cuit.service.LoginService;
import com.cuit.service.MenuListService;
import com.cuit.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/api")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping("/login")
    private Result Login(@RequestBody UserLogin userLogin, HttpServletRequest request){
        return loginService.login(userLogin,request);
    }
}
